﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABELGX
{
    /// <summary>
    /// 传感器设置
    /// </summary>
    [Serializable]
    public class SensorSet
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; } = "";
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; } = "";
        /// <summary>
        /// 系数
        /// </summary>
        public double Scale { get; set; } = 1;
        /// <summary>
        /// 偏移
        /// </summary>
        public double Offset { get; set; }
        /// <summary>
        /// 显示格式
        /// </summary>
        public string Format { get; set; } = "f1";
        public List<SensorLevel> Levels { get; set; } = new List<SensorLevel>();
        public SensorSet() { }
        public SensorSet(string name,string unit,double scale,string format) 
        {
            Name = name;
            Unit = unit;
            Scale = scale;
            Format = format;
        }
        public SensorSet(string name, string unit, double scale,double offset, string format)
        {
            Name = name;
            Unit = unit;
            Scale = scale;
            Offset = offset;
            Format = format;
        }
    }
}
